package cn.yili12.server.info.handler;

import cn.yili12.server.info.vo.InfoMessage;
import cn.yili12.server.info.vo.InfoMessageType;
import cn.yili12.server.mq.QueueProducer;
import com.alibaba.fastjson.JSON;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 获取所有在线好友
 */
@Slf4j
@Component
public class OnlineListInfoHandler extends BaseInfoHandler {


    @Override
    public boolean handler(InfoMessage message) {
        //通知所有人  我上线了
        webSocketChannelPool.sendTo(message.getFrom(), JSON.toJSONString(message));
        return true;
    }
}
